/*
 * Copyright (c) 2019 - 2020 IoT Company of Midea Group.
 *
 * File Name 	    : 
 * Description	    : HAL adaptor
 *
 * Version	        : v0.1
 * Author			: 
 * Date	            : 2019/09/15  refactoring
 * History	        : 
 */

#ifndef __MS_HAL_PLATFORM_H__
#define	__MS_HAL_PLATFORM_H__

#include "ms_osal_log.h"
#include "ms_osal.h"
#include "ms_hal.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef enum
{
    MS_HAL_PLATFORM_MSDK = 0, // default
    MS_HAL_PLATFORM_HI3861,
    MS_HAL_PLATFORM_BK7231U,
} ms_hal_platform_t;

/**
 * @brief reboot os
 * @param NULL 
 * @return NULL
 */
void ms_hal_sys_reboot(void);

/**
 * @brief random number generator
 * @param NULL 
 * @return random number from software
 */
uint32_t ms_hal_sys_random(void);

/**
 * @brief random number generator 
 * @param NULL 
 * @return random number from hardware
 */
ms_hal_result_t ms_hal_sys_rng(void *buf, uint32_t len);

/**
 * @brief chip platform version print
 * @param NULL
 * @return NULL
 */
void ms_hal_sys_print_platform_ver(void);

/**
 * @brief chip platform get, if you are new chip, just return MS_HAL_PLATFORM_UNKNOWN.
 * @param NULL
 * @return ms_hal_platform_t
 */
ms_hal_platform_t ms_hal_sys_get_platform_type(void);

#ifdef __cplusplus
}
#endif

#endif

